package graphics.Shapes;

import graphics.GraphicalObject;

import javax.media.opengl.GL;


public class Box extends GraphicalObject {
	@Override
	public void render(GL gl) {
		gl.glColor3f(0.1f, 0.1f, 0.1f);
	    gl.glBegin(GL.GL_QUADS);
	    
	    gl.glNormal3d(0,	0,	-1);
	    gl.glVertex3d(-1,	-1,	-1);
	    gl.glVertex3d(-1,	1,	-1);
	    gl.glVertex3d(1,	1,	-1);
	    gl.glVertex3d(1,	-1,	-1);

	    gl.glNormal3d(0,	0,	1);
	    gl.glVertex3d(-1,	-1,	1);
	    gl.glVertex3d(-1,	1,	1);
	    gl.glVertex3d(1,	1,	1);
	    gl.glVertex3d(1,	-1,	1);

	    gl.glNormal3d(0,	-1,	0);
	    gl.glVertex3d(-1,	-1,	-1);
	    gl.glVertex3d(1,	-1,	-1);
	    gl.glVertex3d(1,	-1,	1);
	    gl.glVertex3d(-1,	-1,	1);

	    gl.glNormal3d(0,	1,	0);
	    gl.glVertex3d(-1,	1,	-1);
	    gl.glVertex3d(1,	1,	-1);
	    gl.glVertex3d(1,	1,	1);
	    gl.glVertex3d(-1,	1,	1);
	    
	    gl.glNormal3d(-1,	0,	0);
	    gl.glVertex3d(-1,	-1,	-1);
	    gl.glVertex3d(-1,	1,	-1);
	    gl.glVertex3d(-1,	1,	1);
	    gl.glVertex3d(-1,	-1,	1);

	    gl.glNormal3d(1,	0,	0);
	    gl.glVertex3d(1,	-1,	-1);
	    gl.glVertex3d(1,	1,	-1);
	    gl.glVertex3d(1,	1,	1);
	    gl.glVertex3d(1,	-1,	1);
	    
	    gl.glEnd();
	    super.render(gl);
	}
	
}
